﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMasterPage.master" AutoEventWireup="true"
    CodeFile="Login.aspx.cs" Inherits="Login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        #dvLogin
        {
            margin: 15px auto 15px auto;
            border: thin solid #C0C0C0;
            width: 350px;
            height: 290px;
            background-color: #F1F1F1;
        }
        #tbLogin
        {
            width: 300px;
            margin-top: 15px;
            margin-right: auto;
            margin-left: auto;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="Server">
    <div id="dvLogin">
        <table id="tbLogin">
            <tr>
                <td height="40px">
                    <asp:Label ID="Label1" runat="server" Text="Login" Font-Size="16pt"></asp:Label>
                </td>
            </tr>
            <tr>
                <td height="75px" valign="top">
                    <asp:Label ID="Label2" runat="server" Text="Username" Font-Bold="True"></asp:Label>
                    <br />
                    <asp:TextBox ID="txtUsername" runat="server" Width="290px" Height="25px" 
                        Font-Size="12pt"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Please! Input username" ControlToValidate="txtUsername" ValidationGroup="login" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td height="75px" valign="top">
                    <asp:Label ID="Label3" runat="server" Text="Password" Font-Bold="True"></asp:Label>
                    <br />
                    <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" Width="290px" Height="25px" Font-Size="12pt"></asp:TextBox>
                    <br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please! Input password" ControlToValidate="txtPassword" ValidationGroup="login" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="CustomValidator1" runat="server" 
                        ErrorMessage="Your username or password is incorrect!" Display="Dynamic" 
                        ValidationGroup="login" ControlToValidate="txtPassword" 
                        onservervalidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td height="40px">
                    <asp:Button ID="btnLogin" runat="server" Text="Login" Height="35px" 
                        Width="90px" Font-Bold="True" onclick="btnLogin_Click" ValidationGroup="login" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
